<template>
  <div v-loading="loading" class="app-container sys-main">
    <div class="main7">
      <ul class="clearfix">
        <li class="pull-left">
          <div
            class="img"
            :style="
              'background-image:url(' +
                require('@/assets/sys/images/icon17.png') +
                ')'
            "
          ></div>
          <h5>管理员</h5>
          <p>{{form.managerCount}}</p>
        </li>
        <li class="pull-left">
          <div
            class="img"
            :style="
              'background-image:url(' +
                require('@/assets/sys/images/icon18.png') +
                ')'
            "
          ></div>
          <h5>部门</h5>
          <p>{{form.departmentCount}}</p>
        </li>
        <li class="pull-left">
          <div
            class="img"
            :style="
              'background-image:url(' +
                require('@/assets/sys/images/icon19.png') +
                ')'
            "
          ></div>
          <h5>维修店</h5>
          <p>{{form.repairCount}}</p>
        </li>
        <li class="pull-left">
          <div
            class="img"
            :style="
              'background-image:url(' +
                require('@/assets/sys/images/icon20.png') +
                ')'
            "
          ></div>
          <h5>资料</h5>
          <p>{{form.attachmentCount}}</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { getIndex } from "@/api/cms/sys";

export default {
  name: "Index",
  data() {
    return {
      loading:false,
      form:{}
    };
  },
  created() {
    this.loading = true;
    getIndex().then(res => {
      this.loading = false;
      this.form = res.data;
    }).catch(err => {
      this.loading = false;
      this.$message.error(err);
    });
  },
  methods: {}
};
</script>

<style scoped lang="scss"></style>
